-
Notifications
You must be signed in to change notification settings - Fork 89
NGSIv1 removal #533
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NGSIv1 removal #533
Conversation
After merging all these PRs and upgrade this PR branch with master, tests pass to ok. Thus, as far as I understand the NGSIv1 removal work in IOTA-JSON code has ended. (Let's have this PR opened while the overall NGSIv1 removal work is completed) |
|
Not sure if the NGSI-v1 removal work has ended in this repo... we have recently discovered |
|
The
Obviously such a situation is only temporary. |
|
I have created (yet another) branch which removes the https://github.com/jason-fox/iotagent-node-lib/tree/feature/isCurrent |
|
Usage of isCurrentNgsi(): https://github.com/telefonicaid/iotagent-json/search?q=isCurrentNgsi |
As third alternative, we can use this PR branch (test-ngsiv1-removal) to remove NGSI-v1 IOTA code, re-scoping it's purpose (from just testing to actual code modification). Thus, it would be merged at the end (rolling back the modifications in packages.json before, as last step). |
| if (iotAgentLib.configModule.isCurrentNgsi()) { | ||
| return constants.TIMESTAMP_TYPE_NGSI2; | ||
| } | ||
| return constants.TIMESTAMP_TYPE; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If TIMESTAMP_TYPE constant is not used in any place, we could remove it from the source file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in c904dfb
lib/iotaUtils.js
Outdated
| callback(error); | ||
| } | ||
|
|
||
| function extractAttributes(results, callback) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After simplifying this function, it has ended basically in a pass-through to the callback function.
Maybe we can simplify even more, removeing extractAttributes() function?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in fd29166
| return device.active[i].type; | ||
| } | ||
| } | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CHANGES_NEXT_RELEASE entry is needed. Something like this:
- Remove: NGSI-v1 specific behaviours
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in fd29166
fgalan
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM to code changes, although not ready to be merged yet (first packages.json should be changed back).
I understand same or similar changes has to be mirrored in PR telefonicaid/iotagent-ul#467
Change done in 286588d |
mapedraza
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This PR is not for being merged, it is just to expose publicly the branch. PR will be closed (and the branch deleted) after CI e2e testing.At the end code modification and test were added.